/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.entity;

import com.thinkgem.jeesite.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

import java.util.List;

/**
 * 订单Entity
 * @author 胡善军
 * @version 2019-05-23
 */
public class Order extends DataEntity<Order> {
	
	private static final long serialVersionUID = 1L;
	private String sn;		// 订单编号
	private String status;		// 状态
	private String totals;		// 总价
	private Home home;		// 地址

	private User user;



	private List<Orderson> list;

	public Order() {
		super();
	}

	public Order(String id){
		super(id);
	}

	@Length(min=0, max=255, message="订单编号长度必须介于 0 和 255 之间")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}


	@Length(min=0, max=255, message="状态长度必须介于 0 和 255 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getTotals() {
		return totals;
	}

	public void setTotals(String totals) {
		this.totals = totals;
	}

	public Home getHome() {
		return home;
	}

	public void setHome(Home home) {
		this.home = home;
	}

	public List<Orderson> getList() {
		return list;
	}

	public void setList(List<Orderson> list) {
		this.list = list;
	}


	//user的set和get
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}